# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python2-flask
_pkgname=Flask
pkgver=1.1.2
pkgrel=2
pkgdesc='A simple framework for building complex web applications.'
url='https://pypi.org/project/Flask/#files'
arch=('any')
license=('BSD')
depends=('python2' 'python2-click' 'python2-jinja' 'python2-werkzeug'
         'python2-itsdangerous')
makedepends=('python2-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('9feb6a9a8f34fadbea508d465f73c24b1d81b3f66243804dc3904d198c2fd78e2e1bef94df6a4940a7eec6b9b54abea06557a87de8b27b0a9497d18b3e071384')

build() {
  cd "$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python2 setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  mv "$pkgdir/usr/bin/flask" "$pkgdir/usr/bin/flask2"
}

